<?php
class OAuthSignatureFactory {
	
	static $classes = array(
		'partuza' => 'Partuza',
		'hyves.nl' => 'Hyves'
	);
	
	static $class_str = '%sSignatureMethod';
	
	static public function createFromConsumerKey($key){
		if(!isset(self::$classes[$key])) throw new sfException('Unknow OAuth signature key');
		
		$class = sprintf(self::$class_str,self::$classes[$key]);
		$class_file = dirname(__FILE__).'/signatures/'.$class.'.class.php';
		if(!file_exists($class_file))  throw new sfException('Class not found '.$class);
		return new $class;
	}
	
	
}
?>